<div style="text-align: center">
    {if !empty($GLOBALS['cfg_m_tongjicode'])}
    <script type="text/javascript" src="{common::get_main_host()}/data/uniapp/js/tongjicode.js"></script>
    {/if}
    {if !empty($GLOBALS['cfg_m_html_kefu'])}
    <script type="text/javascript" src="{common::get_main_host()}/data/uniapp/js/kefu.js"></script>
    {/if}
	<script>
		(function() {
			
			// 判断是否微信浏览器
			function isWeiXin(){
			    var ua = window.navigator.userAgent.toLowerCase();
			    if(ua.match(/MicroMessenger/i) == 'micromessenger'){
			        return true;
			    }else{
			        return false;
			    }
			}
			
			function handleFontSize() {
			    // 设置网页字体为默认大小
			    WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize' : '12px' });
			    // 重写设置网页字体大小的事件
			    WeixinJSBridge.on('menu:setfont', function() {
			        WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize' : '12px' });
			    });
			}
			
			if(isWeiXin){
				if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
				    handleFontSize();
				} else {
				    if (document.addEventListener) {
				        document.addEventListener("WeixinJSBridgeReady", handleFontSize, false);
				    } else if (document.attachEvent) {
				        document.attachEvent("WeixinJSBridgeReady", handleFontSize);
				        document.attachEvent("onWeixinJSBridgeReady", handleFontSize);  }
				}
			}
		    
		})();
	</script>
</div>